home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / JForth / Extras / ODE / clone_support < prev    next >
Encoding:
Text File  |  1991-10-24  |  1.4 KB  |  69 lines

  1.  
  2. ANEW Task-Clone_Support
  3.  
  4.  
  5. \ This file...
  6. \
  7. \ 1. Defines a word that, given the beginning of the CFA table,
  8. \    return the #of methods in that class.  It then initializes
  9. \    a predefined DEFERed word (from JF:BUILDSYS) that is
  10. \    referenced by CLONE.   mdh 7/7/88
  11. \
  12. \ 2. Defines a word that, given the pfa of the :CLASS definition,
  13. \    returns the address of the CFATable.  mdh 7/15/88
  14. \
  15. \ 3. Define three words for traversing the IVAR DEFINITION structure
  16. \    mdh 7/16/88
  17.  
  18.  
  19. \ =============================== #1 ==============================
  20.  
  21.  
  22. : (>#Methods)   ( &cfa0 -- #methods )
  23.     [ ob_cfas ob_#methods - ] literal    - @
  24. ;
  25.  
  26. ' (>#Methods) is >#METHODS
  27.  
  28.  
  29. \ =============================== #2 ==============================
  30.  
  31.  
  32. : (>CFATable)  ( pfa -- CFATable )
  33.     [ do-does-size ob_cfas + ] literal  +
  34. ;
  35.  
  36. ' (>CFATable) is >CFATable
  37.  
  38.  
  39. \ =============================== #3 ==============================
  40.  
  41.  
  42. : (>LASTIVAR)   ( classcfa -- last_ivar_field )
  43.     [ do-does-size ob_last_ivar + ] literal  +
  44. ;
  45.  
  46. ' (>LASTIVAR) is >LASTIVAR
  47.  
  48. : (>PREVIVAR)   ( ivarcfa -- prev_ivar_field )
  49.     [ do-does-size obi_previous + ] literal  +
  50. ;
  51.  
  52. ' (>PREVIVAR) is >PREVIVAR
  53.  
  54. : (>IVARCLASS)   ( ivarcfa -- ivar_class_field )
  55.     [ do-does-size obi_rel_class + ] literal  +
  56. ;
  57.  
  58. ' (>IVARCLASS) is >IVARCLASS
  59.  
  60. .need CFATABLE>
  61. defer CFATABLE>
  62. .then
  63.  
  64. : (CFATABLE>)   ( &cfatable -- $classtablebase )
  65.     [ do-does-size ob_cfas + ] literal -
  66. ;
  67.  
  68. ' (CFATABLE>) is CFATABLE>
  69.